home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Auge 4000 / Auge 4000 #47 (1990-06-22)(Amiga User Gruppe Einzugsgebiet 4000).zip / Auge 4000 #47 (1990-06-22)(Amiga User Gruppe Einzugsgebiet 4000).adf / arp-pro1.3 / OLD_MANUAL / TRAK_ID < prev    next >
Text File  |  1990-06-22  |  4KB  |  133 lines

  1.  
  2.  
  3.  
  4.      TRAK_IDS(33.4)      ARP Programmers Manual    TRAK_IDS(33.4)
  5.  
  6.  
  7.  
  8.      NAME
  9.       TRAK_IDS - Discussion    of items tracked by ID value.
  10.  
  11.      IDS
  12.       The object tracked will be located in    dt_Object.
  13.  
  14.       TRAK_AAMEM - this is the default, and    refers to the
  15.           allocation of    the tracking node itself.  You get
  16.           this by calling GetTracker().
  17.  
  18.       TRAK_LOCK - obtained by calling ArpLock() or ArpDupLock()
  19.  
  20.       TRAK_FILE - obtained by calling ArpOpen()
  21.  
  22.       TRAK_WINDOW -    place the window pointer in dt_Object. If this
  23.           window is sharing its    IDCMP with another window,
  24.           place    its address in dt_Extra, else place NULL in
  25.           dt_Extra.  If    dt_Extra is not    NULL, then the IDCMP
  26.           ports    for this window    will not be freed.
  27.  
  28.       TRAK_SCREEN -    the screen pointer should be placed in
  29.           dt_Object.
  30.  
  31.       TRAK_LIBRARY - the library pointer should be placed in
  32.           dt_Object.
  33.  
  34.       TRAK_DAMEM - the DosAllocMem() block pointer should be
  35.           placed in dt_Object.
  36.  
  37.       TRAK_MEMNODE - This frees one    instance of a memnode as
  38.           allocated by AllocEntry().  The node,    which should
  39.           be placed in dt_Object, should not be    on a MemList,
  40.           since    Remove() will not be called, and any other
  41.           nodes    on such    a list would not be freed, unless they
  42.           are also tracked by their own    instances of
  43.           TRAK_MEMNODE.
  44.  
  45.       TRAK_SEGLIST - A BPTR    to the seglist should be placed    in
  46.           dt_Object.
  47.  
  48.       TRAK_RESLIST - A Pointer to an ARP reslist.
  49.  
  50.       TRAK_MEM - Obtained for you by a call    to ArpAllocMem(),
  51.           dt_Object is a pointer to the    mem, and dt_Extra is
  52.           its size.
  53.  
  54.       TRAK_DALIST -    dt_Object is pointer to    list node to start
  55.           freeing from.
  56.  
  57.       TRAK_ANCHOR -    dt_Object is pointer to    an AnchorPath
  58.           structure chain.
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                         (printed 2/27/88)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      TRAK_IDS(33.4)      ARP Programmers Manual    TRAK_IDS(33.4)
  71.  
  72.  
  73.  
  74.       TRAK_GENERIC - This is the most flexible, but    also somewhat
  75.           tricky to use.  Essentially, at resource freeing
  76.           time,    you get    called to do the work.    This allows
  77.           you to monitor many resources    at once    in complex
  78.           interactions,    or track custom    software structures
  79.           which    have been allocated, almost anything at    all.
  80.           Using    this id, you can also have yourself called
  81.           when the system goes into a memory panic.  When this
  82.           occurs, the amiga ROM    kernal routines    attempt    to
  83.           free any objects not currently in use, such as
  84.           libraries, or    devices.  You can participate in this
  85.           if there are resources you can free to aid the user
  86.           during a heavy memory    crunch by using    this id.
  87.  
  88.           To use, place    a pointer to the function to call in
  89.           tr_Extra.tg_Function,    and also place the actual
  90.           binary values    of the code in the first long word of
  91.           your function    in tr_Object.tg_Verify.     arp.library
  92.           uses this value to determine whether or not you are
  93.           still    in the system when it is time to call the
  94.           function.  Should you    have abandoned your resources,
  95.           ARP can use this value to tell if your function is
  96.           where    it should be, if it isn't, you won't be
  97.           called.  This    of course means    that the dt_Object
  98.           union    does not carry the tracked object, either your
  99.           function must    not what it is being called to do, or
  100.           you must extend the TrackedResource structure    so it
  101.           has additional private data for your use.
  102.  
  103.           When called, a copy of tg_Verify will    be placed in
  104.           D1, and a pointer to the TrackedResource (note: not
  105.           a DefaultTracker, but    the base of that structure)
  106.           will be in A2. In addition, your code    will be
  107.           running in a Forbidden() section, so you need    to be
  108.           quick.  arp.library will have    zeroed the value in
  109.           tg_Verify, if    you want to be called again, you need
  110.           to restore the tg_Verify value to its    former value
  111.           (stored in D1).  If you leave    tg_Verify zero,    the
  112.           resource manager will    free the tracker node, and you
  113.           will not be called again.
  114.  
  115.           If you want to be called during a system wide    memory
  116.           panic, you should use    FreeAccess() on    your track
  117.           generic node as soon as possible, this will cause
  118.           your code to run should a panic occur.
  119.  
  120.           Finally, note    that you must preserve the contents of
  121.           registers D2-D7 and A2-A6.
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                         (printed 2/27/88)
  130.  
  131.  
  132.  
  133.